Platform Explorer / Nuxeo Platform 5.8

Contribution org.nuxeo.ecm.platform.picture.commandline.imagemagick--command

This contribution is part of XML component org.nuxeo.ecm.platform.picture.commandline.imagemagick inside nuxeo-platform-imaging-core-5.8.jar

Extension Point

Extension point command of component CommandLineExecutorComponent.

Contributed Items

  • <command enabled="true" name="identify">
          <commandLine>identify</commandLine>
          <parameterString> -ping -format '%m %w %h %z' #{inputFilePath}[0]</parameterString>
          <winParameterString> -ping -format "%m %w %h %z" #{inputFilePath}[0]</winParameterString>
          <installationDirective>You need to install ImageMagic.</installationDirective>
        </command>
  • <command enabled="true" name="crop">
          <commandLine>stream</commandLine>
          <parameterString> -map rgb -storage-type char -extract  #{tileWidth}x#{tileHeight}+#{offsetX}+#{offsetY} #{inputFilePath}[0]  - | convert -depth 8 -size #{tileWidth}x#{tileHeight}  rgb:-  #{outputFilePath} </parameterString>
          <winParameterString> -map rgb -storage-type char -extract  #{tileWidth}x#{tileHeight}+#{offsetX}+#{offsetY} #{inputFilePath}  - | convert -depth 8 -size #{tileWidth}x#{tileHeight}  rgb:-  #{outputFilePath} </winParameterString>
          <installationDirective>You need to install ImageMagic.</installationDirective>
        </command>
  • <command enabled="true" name="resizer">
          <commandLine>convert</commandLine>
          <parameterString>-flatten -resize #{targetWidth}x#{targetHeight} -depth #{targetDepth} #{inputFilePath}[0] #{outputFilePath}</parameterString>
          <winParameterString>-flatten -resize #{targetWidth}x#{targetHeight} -depth #{targetDepth} #{inputFilePath} #{outputFilePath}</winParameterString>
          <installationDirective>You need to install ImageMagic.</installationDirective>
        </command>
  • <command enabled="true" name="gifResizer">
          <commandLine>convert</commandLine>
          <parameterString>#{inputFilePath} -coalesce -resize #{targetWidth}x#{targetHeight} -depth #{targetDepth} -deconstruct #{outputFilePath}</parameterString>
          <installationDirective>You need to install ImageMagic.</installationDirective>
        </command>
  • <command enabled="true" name="rotate">
          <commandLine>convert</commandLine>
          <parameterString>-rotate #{angle} #{inputFilePath}[0] #{outputFilePath}</parameterString>
          <winParameterString>-rotate #{angle} #{inputFilePath} #{outputFilePath}</winParameterString>
          <installationDirective>You need to install ImageMagic.</installationDirective>
        </command>
  • <command enabled="true" name="cropAndResize">
          <commandLine>stream</commandLine>
          <parameterString> -map rgb -storage-type char -extract  #{tileWidth}x#{tileHeight}+#{offsetX}+#{offsetY} #{inputFilePath} - | convert -depth 8 -size #{tileWidth}x#{tileHeight} -resize #{targetWidth}x#{targetHeight}!  rgb:-  #{outputFilePath} </parameterString>
          <installationDirective>You need to install ImageMagic.</installationDirective>
        </command>
  • <command enabled="true" name="converter">
          <commandLine>convert</commandLine>
          <parameterString>-colorspace rgb #{inputFilePath}[0] #{outputFilePath}</parameterString>
          <winParameterString>-colorspace rgb #{inputFilePath} #{outputFilePath}</winParameterString>
          <installationDirective>You need to install ImageMagic.</installationDirective>
        </command>
  • <command enabled="true" name="multiTiler">
          <commandLine>convert</commandLine>
          <parameterString>#{inputFilePath}  -crop #{tileWidth}x#{tileHeight} + repage   #{outputFilePath}</parameterString>
          <installationDirective>You need to install ImageMagic.</installationDirective>
        </command>

XML Source

<extension point="command" target="org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent">

    <command enabled="true" name="identify">
      <commandLine>identify</commandLine>
      <parameterString> -ping -format '%m %w %h %z' #{inputFilePath}[0]</parameterString>
      <winParameterString> -ping -format "%m %w %h %z" #{inputFilePath}[0]</winParameterString>
      <installationDirective>You need to install ImageMagic.</installationDirective>
    </command>

    <command enabled="true" name="crop">
      <commandLine>stream</commandLine>
      <parameterString> -map rgb -storage-type char -extract  #{tileWidth}x#{tileHeight}+#{offsetX}+#{offsetY} #{inputFilePath}[0]  - | convert -depth 8 -size #{tileWidth}x#{tileHeight}  rgb:-  #{outputFilePath} </parameterString>
      <winParameterString> -map rgb -storage-type char -extract  #{tileWidth}x#{tileHeight}+#{offsetX}+#{offsetY} #{inputFilePath}  - | convert -depth 8 -size #{tileWidth}x#{tileHeight}  rgb:-  #{outputFilePath} </winParameterString>
      <installationDirective>You need to install ImageMagic.</installationDirective>
    </command>

    <command enabled="true" name="resizer">
      <commandLine>convert</commandLine>
      <parameterString>-flatten -resize #{targetWidth}x#{targetHeight} -depth #{targetDepth} #{inputFilePath}[0] #{outputFilePath}</parameterString>
      <winParameterString>-flatten -resize #{targetWidth}x#{targetHeight} -depth #{targetDepth} #{inputFilePath} #{outputFilePath}</winParameterString>
      <installationDirective>You need to install ImageMagic.</installationDirective>
    </command>

    <command enabled="true" name="gifResizer">
      <commandLine>convert</commandLine>
      <parameterString>#{inputFilePath} -coalesce -resize #{targetWidth}x#{targetHeight} -depth #{targetDepth} -deconstruct #{outputFilePath}</parameterString>
      <installationDirective>You need to install ImageMagic.</installationDirective>
    </command>

    <command enabled="true" name="rotate">
      <commandLine>convert</commandLine>
      <parameterString>-rotate #{angle} #{inputFilePath}[0] #{outputFilePath}</parameterString>
      <winParameterString>-rotate #{angle} #{inputFilePath} #{outputFilePath}</winParameterString>
      <installationDirective>You need to install ImageMagic.</installationDirective>
    </command>

    <command enabled="true" name="cropAndResize">
      <commandLine>stream</commandLine>
      <parameterString> -map rgb -storage-type char -extract  #{tileWidth}x#{tileHeight}+#{offsetX}+#{offsetY} #{inputFilePath} - | convert -depth 8 -size #{tileWidth}x#{tileHeight} -resize #{targetWidth}x#{targetHeight}!  rgb:-  #{outputFilePath} </parameterString>
      <installationDirective>You need to install ImageMagic.</installationDirective>
    </command>

    <command enabled="true" name="converter">
      <commandLine>convert</commandLine>
      <parameterString>-colorspace rgb #{inputFilePath}[0] #{outputFilePath}</parameterString>
      <winParameterString>-colorspace rgb #{inputFilePath} #{outputFilePath}</winParameterString>
      <installationDirective>You need to install ImageMagic.</installationDirective>
    </command>

    <command enabled="true" name="multiTiler">
      <commandLine>convert</commandLine>
      <parameterString>#{inputFilePath}  -crop #{tileWidth}x#{tileHeight} + repage   #{outputFilePath}</parameterString>
      <installationDirective>You need to install ImageMagic.</installationDirective>
    </command>

  </extension>